package brainsplash.gyrusscope.game;

import java.util.ArrayList;

import brainsplash.gyrusscope.framework.gl.SpriteBatcher;
import brainsplash.gyrusscope.framework.impl.GLGraphics;

public class Particles {
	static ArrayList<ParticleSystem> partSystems = new ArrayList<ParticleSystem>();
	
	public static void update() {
		for (int i = 0; i < partSystems.size(); i++) {
			ParticleSystem ps = partSystems.get(i);
			ps.update();
			if (ps.amount == 0 && ps.particles.isEmpty()) {partSystems.remove(ps);}
		}
	}
	
	public static void dispose() {
        for (int j = 0; j < partSystems.size(); j++) {
        	ParticleSystem ps = partSystems.get(j);
        	ps.particles.clear();
        }
        partSystems.clear();
	}
}
